<!DOCTYPE html>
<html lang="zh_CN" style="overflow: hidden;">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <meta charset="utf-8">
    <title>{:lang('ADMIN_CENTER')}</title>
    <meta name="description" content="This is page-header (.page-header &gt; h1)">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- HTML5 shim for IE8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->
    <link href="__TMPL__/public/assets/themes/{:dc_get_admin_style()}/bootstrap.min.css" rel="stylesheet">
    <link href="__TMPL__/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet">
    <link href="__STATIC__/font-awesome/css/font-awesome.min.css?page=index" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="__TMPL__/public/assets/themes/{:dc_get_admin_style()}/simplebootadminindex.min.css">
    <link href="__STATIC__/font-cloud/css/font-cloud.css" rel="stylesheet" type="text/css">
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="__TMPL__/public/assets/js/jquery-1.10.2.min.js"></script>
    <script src="__STATIC__/js/layer/layer.js"></script>
    <style>
        /*-----------------导航hack--------------------*/
        .nav-list > li.open {
            position: relative;
        }

        .nav-list > li.open .back {
            display: none;
        }

        .nav-list > li.open .normal {
            display: inline-block !important;
        }

        .nav-list > li.open a {
            padding-left: 7px;
        }

        .nav-list > li .submenu > li > a {
            background: #fff;
        }

        .nav-list > li .submenu > li a > [class*="fa-"]:first-child {
            left: 20px;
        }

        .nav-list > li ul.submenu ul.submenu > li a > [class*="fa-"]:first-child {
            left: 30px;
        }

        /*----------------导航hack--------------------*/
    </style>

    <script>
        //全局变量
        var GV = {
            HOST: "{$_SERVER['HTTP_HOST']}",
            ROOT: "__ROOT__/",
            WEB_ROOT: "__WEB_ROOT__/",
            JS_ROOT: "static/js/"
        };
    </script>

    <if condition="APP_DEBUG">
        <style>
            #think_page_trace_open {
                left: 0 !important;
                right: initial !important;
            }
        </style>
    </if>

</head>

<body style="min-width:900px;overflow: hidden;">
<div id="loading"><i class="loadingicon"></i><span>{:lang('LOADING')}</span></div>
<div id="right-tools-wrapper">
    <!--<span id="right_tools_clearcache" title="清除缓存" onclick="javascript:openapp('{:url('admin/Setting/clearcache')}','right_tool_clearcache','清除缓存');"><i class="fa fa-trash-o right_tool_icon"></i></span>-->
    <!--<span id="refresh-wrapper" title="{:lang('REFRESH_CURRENT_PAGE')}"><i-->
    <!--class="fa fa-refresh right_tool_icon"></i></span>-->
</div>
<div class="head-container">
    <div class="container-fluid">
        <div class="pull-left">
            <h5 class="system-name">管理平台系统</h5>
        </div>
        <div class="pull-right shortcuts">
            <em>
                {:lang('WELCOME_USER',array('user_nickname' => empty($admin['user_nickname'] )? $admin['user_login'] : $admin['user_nickname']))}
            </em>
        </div>
    </div>
    <div class="navbar navbar-default">
        <div class="container-fluid">
            <div id="navbar-main">
                <div class="pull-left" style="position: relative;">
                    <a id="task-pre" class="task-changebt"><i class="fa fa-chevron-left"></i></a>
                    <div id="task-content">
                        <ul class="nav navbar-nav dc-component-tab" id="task-content-inner">
                            <li class="dc-component-tabitem noclose tab-index min-tab-index active" app-id="0" app-url="{:url('main/index')}" app-name="平台首页">
                                <a class="dc-tabs-item-text" href="/"><i class="icon-home"></i> <span>平台首页</span></a>
                            </li>
                        </ul>
                        <div style="clear:both;"></div>
                    </div>
                    <a id="task-next" class="task-changebt"><i class="fa fa-chevron-right"></i></a>
                </div>

            </div>
        </div>
    </div>
</div>

<div class="main-container container-fluid min-model">

    <div class="sidebar" id="sidebar">
        <div class="sidebar-shortcuts" id="sidebar-shortcuts">
            <a class="btn btn-sm btn-default fa fa-dedent" href="javascript:void(0);" title="收起菜单栏"></a>
        </div>
        <div id="nav-wrapper">
            <ul class="nav nav-list">
                <foreach name="menus" item="item" key="key">
                    <li>
                        <a href="javascript:openapp('{$item.url}','{$key}','{$item.title}',true);">
                            <i class="fa fa-desktop normal"></i>
                            <span class="menu-text normal"> {$item.title} </span>
                        </a>
                    </li>
                </foreach>
            </ul>
        </div>

    </div>

    <div class="main-content">
        <div class="page-content" id="content">
            <a id="refresh-wrapper" href="javacript:void(0);" title="{:lang('REFRESH_CURRENT_PAGE')}">
                <i class="fa fa-refresh right_tool_icon"></i>
            </a>
            <iframe src="{:url('Main/index')}" style="width:100%;height: 100%;" frameborder="0" id="appiframe-0"
                    class="appiframe"></iframe>
        </div>
    </div>
</div>

<script src="__TMPL__/public/assets/js/jquery-1.10.2.min.js"></script>
<script src="__STATIC__/js/wind.js"></script>
<script src="__TMPL__/public/assets/js/bootstrap.min.js"></script>
<script src="__STATIC__/js/admin.js"></script>
<script src="__TMPL__/public/assets/simpleboot3/js/adminindex.js"></script>
<script>
    (function (window, $) {
        // 导航栏收缩
        var collapse = getCookie('leftNavCollapse');
        collapse = !(collapse === 'false' || !collapse);
        var actionBtn = $('#sidebar-shortcuts a');
        var mainContainer = $('.main-container');
        var tabIndex = $('#task-content .tab-index');

        // 导航栏收起
        function leftNavCollapse() {
            tabIndex.addClass('min-index-tab');
            actionBtn.removeClass('fa-dedent').addClass('fa-indent').attr('title', '展开导航栏');
            mainContainer.addClass('min-model');
        }

        // 导航栏展开
        function leftNavUnfold() {
            tabIndex.removeClass('min-index-tab');
            actionBtn.removeClass('fa-indent').addClass('fa-dedent').attr('title', '最小化导航栏');
            mainContainer.removeClass('min-model');
        }

        // 自动判断是否展开
        function navAutoDisplay() {
            if(collapse) {
                leftNavCollapse();
            } else {
                leftNavUnfold();
            }
        }

        // 展开或隐藏
        actionBtn.click(function () {
            collapse = !collapse;
            setCookie('leftNavCollapse', collapse);
            navAutoDisplay();
        });

        navAutoDisplay();

        $(function () {
            $("[data-toggle='tooltip']").tooltip();
            $("li.dropdown").hover(function () {
                $(this).addClass("open");
            }, function () {
                $(this).removeClass("open");
            });
        });

        var ismenumin = $("#sidebar").hasClass("menu-min");
        $(".nav-list").on("click", function (event) {
            var closest_a = $(event.target).closest("a");
            if (!closest_a || closest_a.length == 0) {
                return
            }
            if (!closest_a.hasClass("dropdown-toggle")) {
                if (ismenumin && "click" == "tap" && closest_a.get(0).parentNode.parentNode == this) {
                    var closest_a_menu_text = closest_a.find(".menu-text").get(0);
                    if (event.target != closest_a_menu_text && !$.contains(closest_a_menu_text, event.target)) {
                        return false
                    }
                }
                return
            }
            var closest_a_next = closest_a.next().get(0);
            if (!$(closest_a_next).is(":visible")) {
                var closest_ul = $(closest_a_next.parentNode).closest("ul");
                if (ismenumin && closest_ul.hasClass("nav-list")) {
                    return
                }
                closest_ul.find("> .open > .submenu").each(function () {
                    if (this != closest_a_next && !$(this.parentNode).hasClass("active")) {
                        if(!collapse) $(this).parent().removeClass("open")
                    }
                });
            }
            if (ismenumin && $(closest_a_next.parentNode.parentNode).hasClass("nav-list")) {
                return false;
            }
            if(!collapse) $(closest_a_next).parent().toggleClass("open");
            return false;
        });
    }(window, $));

</script>
</body>
</html>
